import request from '../../utils/request';
let baseRequest_url = "http://127.0.0.1:4890/portal";
//  --------------------------------------------------------------------------------------------------------------- //
// 广告位列表分页查询
export const findAdvertListPage = query => {
    return request({
        url: baseRequest_url+'/admin/advert/findAdvertListPage',
        method: 'get',
		params: query,
    });
};
// 广告位详情查询
export const findAdvertInfoById = query => {
    return request({
        url: baseRequest_url+'/admin/advert/findAdvertInfoById/'+query,
        method: 'get',
		params: query,
    });
};
// 新增广告位
export const addAdvert = data => {
    return request({
        url: baseRequest_url+'/admin/advert/saveAdvert',
        method: 'post',
		data: data,
    });
};
// 编辑广告位
export const saveAdvert = data => {
    return request({
        url: baseRequest_url+'/admin/advert/saveAdvert',
        method: 'put',
		data: data,
    });
};
// 删除广告位
export const deleteAdvert = data => {
    return request({
        url: baseRequest_url+'/admin/advert/deleteAdvert/'+data,
        method: 'delete',
    });
};
// 批量删除广告位
export const batchDeleteAdvert = data => {
    return request({
        url: baseRequest_url+'/admin/advert/batchDeleteAdvert',
        method: 'delete',
        data: data
    });
};
// 广告位状态批量更新
export const batchEditStatus = data => {
    return request({
        url: baseRequest_url+'/admin/advert/batchEditStatus',
        method: 'put',
		data: data,
    });
};